package com.sujinyang.stateless_service.controller;


import com.sujinyang.stateless_service.common.BaseMethod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class HelloController {


    @Autowired
    private HttpServletRequest request;


    @GetMapping("hello")
    public String hello() {
        System.out.println("当前请求的角色是:"+ BaseMethod.getUser(request));
        return "hello world";
    }


}
